"""
@ProjectName : Game
@File        : bullet.py
@Author      : WorldWind(1772830365@qq.com)
@Address     : ChangSha - BoWeiFeng
@Date        : 2025/7/17 下午3:48
"""


class Bullet:
    def __init__(self,damage):
        self.damage = damage # 子弹伤害的程度
        print(f'This is __init__ method. {self.get_class_name()} class startup')
    def hurt(self,people):
        # 子弹打中目标,被打中的人血量减少
        people.lostBlood(self.damage)
        pass
    @classmethod
    def get_class_name(cls):
        return cls.__name__

    def __del__(self):
        print(f'This is __del__ method. The {self.get_class_name()} class has been recycled')
